package com.practice.demo;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/calc")
public class calcdemo {
    //事实证明可以修改@RequestMapping的()中的名称
    //只需要与html对应即可,如果报错404,强刷一下即可
    @RequestMapping("/sum1")
    public String sum1(Integer num1,Integer num2){
        Integer sum=num1+num2;
        return "相加的结果="+sum;
    }
}
